<?php
/**
 * 任务文件接口
 * User: lhh
 * Date: 2016/8/30
 * Time: 15:44
 */
class TaskController extends \Our\Controller_AbstractApi {

    /**
     * 任务列表
     */
    public function listAction(){
        $mysql = \Mysql\TaskModel::getInstance();
        $now_time = CommonFun::local_format_time();
        $columns = array('name','url','money','start_time','end_time');
        $where = "status=1 AND start_time>='".$now_time."' AND end_time<='".$now_time."'";
        $order = 'sort_order asc';
        $limit = '10';
        $now_page = 1;
        $data  = $mysql->getPageList($where,$limit,$now_page,$order,$columns);
        echo $this->jsonEncode($this->apiData($data));
    }
}
